#pragma once

#include <string>
#include <fstream>

#include "Consts.h"
#include "CodecStream.h"

namespace Huffman {

	class PlainCodecStream : public CodecStream
	{
	public:
		PlainCodecStream(std::string fileName);
		~PlainCodecStream(void);

		virtual int read();
		virtual void write(byte b);
		
		virtual int readInt();
		virtual void writeInt(int val);

		virtual void read(byte* buffer, int offset, int size);
		virtual void write(byte* buffer, int offset, int size);

		virtual void close();

	private:
		std::fstream* fileStream;
	};
}